package com.ego.order.vo;

import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

/**
 * @program: ego
 * @description: 订单确认页信息Vo
 * @author: KamTang
 * @create: 2022-12-20 13:07
 **/
@Setter
@Getter
public class OrderConfirmVo {
    /**
     * 收货地址
     */
    private List<AddressVo> addressVos;

    /**
     * 所有选中的购物项
     */
    private List<CartItemVo> cartItemVos;

    /**
     * 订单总额
     */
    private BigDecimal totalAmount;

    /**
     * 应付
     */
    private BigDecimal payPrice;


    @Getter
    @Setter
    public static class AddressVo {

        private Long id;
        /**
         * member_id
         */
        private Long memberId;
        /**
         * 收货人姓名
         */
        private String name;
        /**
         * 电话
         */
        private String phone;
        /**
         * 邮政编码
         */
        private String postCode;
        /**
         * 省份/直辖市
         */
        private String province;
        /**
         * 城市
         */
        private String city;
        /**
         * 区
         */
        private String region;
        /**
         * 详细地址(街道)
         */
        private String detailAddress;
        /**
         * 省市区代码
         */
        private String areaCode;
        /**
         * 是否默认
         */
        private Integer defaultStatus;
    }

    @Setter
    @Getter
    public static class CartItemVo {
        private Long skuId;
        private Boolean selected;
        private String title;
        private String image;
        private List<String> skuAttrs;
        private BigDecimal price;
        private Integer count;
        private BigDecimal totalPrice;
        /**
         * 是否参与促销
         */
        private Integer promotion = 0;
    }
}
